import pandas as pd

def check_second_column():
    """专门检查第2列的数据"""
    
    file_path = "d:/pycode/ding/宸著锦庭6月考勤.xlsx"
    df = pd.read_excel(file_path, skiprows=2)
    
    print("钉钉表第2列（Unnamed: 1）的所有非空数据:")
    print("="*60)
    
    if len(df.columns) > 1:
        col_1 = df.columns[1]  # 第2列
        data_1 = df[col_1].dropna()
        
        job_titles = ['秩序员', '礼宾员', '队长', '领班', '保安', '门岗', '消控员', '礼兵员']
        chinese_names = []
        
        for i, val in enumerate(data_1):
            val_str = str(val).strip()
            print(f"  {i+1}: {val_str}")
            
            # 检查是否是中文姓名
            if 2 <= len(val_str) <= 4 and all('\u4e00' <= char <= '\u9fff' for char in val_str):
                if val_str not in job_titles:
                    chinese_names.append(val_str)
                    print(f"      >>> 这是中文姓名!")
                else:
                    print(f"      >>> 这是职位名称")
        
        print(f"\n找到的中文姓名: {chinese_names}")
        print(f"中文姓名数量: {len(chinese_names)}")
    
    # 也检查工资表的姓名列，看看格式
    print("\n\n工资表的姓名列样本:")
    print("="*40)
    
    salary_df = pd.read_excel("d:/pycode/工资表.xlsx")
    if '姓名' in salary_df.columns:
        names = salary_df['姓名'].dropna().head(10)
        for i, name in enumerate(names):
            print(f"  {i+1}: {name}")

if __name__ == "__main__":
    check_second_column()